﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title> 
    <link rel="stylesheet" type="text/css" href="/HR_SYSTEM/Styles/admin-all.css" />
    <link rel="stylesheet" type="text/css" href="/HR_SYSTEM/Styles/base.css"/>
    <script type="text/javascript" src="/HR_SYSTEM/Scripts/jquery-1.7.2.js"></script> 
    <script type="text/javascript" src="/HR_SYSTEM/Scripts/ChurAlert.min.js?skin=blue"></script>
	<script type="text/javascript" src="/HR_SYSTEM/Scripts/jquery-ui-1.8.22.custom.min.js"></script>
    <script type="text/javascript" src="/HR_SYSTEM/Scripts/chur-alert.1.0.js"></script>
    <script type="text/javascript" src="/HR_SYSTEM/Scripts/tb.js"></script>
    <link rel="stylesheet" type="text/css" href="/HR_SYSTEM/Styles/ui-lightness/jquery-ui-1.8.22.custom.css"/>
    <link rel="stylesheet" type="text/css" href="/HR_SYSTEM/Styles/formui.css"/>
    <script type="text/javascript">
		function validate() {
			if (event.keyCode != 13 && event.keyCode != 38 && event.keyCode != 40) {
				var password1 = document.getElementById("password1").value;
				var password2 = document.getElementById("password2").value;
				var message = document.getElementById("msg");
				message.innerHTML = "<font color='red'>两次输入密码不同</font>";
				if(password1==password2){
					
				}	
			}
		}
    </script>
</head>
<body>
    <div class="alert alert-info">当前位置<b class="tip"></b>修改页面<b class="tip"></b>密码修改</div>
    <form action="<c:url value='/UserServlet'/>" method="post">
    <input type="hidden" name="method" value="updatePassword"/>
    <table class="tbform">
        <thead>
            <tr>
                <td colspan="6" class="auto-style2">&nbsp;请修改您的密码 </td>
            </tr>
        </thead>
        <tbody>
        
            <tr>
                <td class="tdl">用户名</td>
                <td>
                    <div class="input-append">
                        <input class="ipt" size="20" type="text" name="username" id="username" value="${sessionScope.user.username}" readonly="readonly"/>
                    </div>
                </td>
           </tr>
           <tr>
                <td class="tdl">原密码</td>
                <td>
                    <div class="input-append">
                        <input class="ipt" size="20" type="password" name="password" id="password"/>
                    </div>
                </td>
           </tr>
           <tr>
                <td class="tdl">新密码</td>
                <td>
                    <div class="input-append">
                        <input class="ipt" size="20" type="password" name="password1" id="password1"/>
                    </div>
                </td>
           </tr>
           <tr>
                <td class="tdl">重复密码</td>
                <td>
                    <div class="input-append">
                        <input class="ipt" size="20" type="password" name="password2" id="password2" onchange="validate()" onpropertychange="validate()"/>
                        <span id="msg">${msg }</span>
                    </div>
                </td>
           </tr>
           <tr>
                <td class="tdl">提交</td>
                <td>
                    <div class="input-append">
                        <input type="submit" value=" 修 改 " class="btn btn-primary login" />
                    </div>
                </td>
           </tr>
        </tbody>
    </table>
	</form>
</body>
</html>
